package com.lantosec.hmrp.modules.archives.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserInfoVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 用户信息表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo extends BaseEntity<UserInfoVO> {

    private static final long serialVersionUID = 1L;
    public UserInfo(UserInfoVO vo){
        this.userInfoId = vo.getUserInfoId();
        this.userId = vo.getUserId();
        this.employeeId = vo.getEmployeeId();
        this.name = vo.getName();
        this.sex = vo.getSex();
        this.birth = vo.getBirth();
        this.jobTitle = vo.getJobTitle();
        this.country = vo.getCountry();
        this.nation = vo.getNation();
        this.nativePlace = vo.getNativePlace();
        this.householdPlace = vo.getHouseholdPlace();
        this.politicalStatus = vo.getPoliticalStatus();
        this.idCard = vo.getIdCard();
        this.idCardFront = vo.getIdCardFront();
        this.idCardBack = vo.getIdCardBack();
        this.phone = vo.getPhone();
        this.workTel = vo.getWorkTel();
        this.familyTel = vo.getFamilyTel();
        this.address = vo.getAddress();
        this.qq = vo.getQq();
        this.wechat = vo.getWechat();
        this.email = vo.getEmail();
        this.partyDate = vo.getPartyDate();
        this.wageId = vo.getWageId();
        this.bank = vo.getBank();
        this.bankSite = vo.getBankSite();
        this.bankCardId = vo.getBankCardId();
        this.personStatus = vo.getPersonStatus();
        this.photo = vo.getPhoto();
        this.marryStatus = vo.getMarryStatus();
        this.resume = vo.getResume();
        this.remark = vo.getRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
        this.integrityFlag = vo.getIntegrityFlag();
        this.logNum = vo.getLogNum();
    }

    @Override
    public UserInfoVO convertToVO(){
        return new UserInfoVO(this);
    }


    /**
     * 用户信息ID
     */
    @TableId(value = "user_info_id", type = IdType.ASSIGN_UUID)
    private String userInfoId;

    /**
     * 用户主表ID
     */
    private String userId;

    /**
     * 工号
     */
    private String employeeId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 性别,字典表取值
     */
    private String sex;

    /**
     * 出生年月
     */
    private String birth;

    /**
     * 职称
     */
    private String jobTitle;

    /**
     * 国籍
     */
    private String country;

    /**
     * 民族，字典值
     */
    private String nation;

    /**
     * 籍贯，字典值
     */
    private String nativePlace;

    /**
     * 户口所在地
     */
    private String householdPlace;

    /**
     * 政治面貌，字典值
     */
    private String politicalStatus;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 身份证图片(正)
     */
    private String idCardFront;

    /**
     * 身份证图片(反)
     */
    private String idCardBack;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 工作电话
     */
    private String workTel;

    /**
     * 家庭电话
     */
    private String familyTel;

    /**
     * 联系地址
     */
    private String address;

    /**
     * QQ号
     */
    private String qq;

    /**
     * 微信号
     */
    private String wechat;

    /**
     * Email
     */
    private String email;

    /**
     * 入党日期
     */
    private String partyDate;

    /**
     * 工资号
     */
    private String wageId;

    /**
     * 开户行
     */
    private String bank;

    /**
     * 开户网点
     */
    private String bankSite;

    /**
     * 银行卡号
     */
    private String bankCardId;

    /**
     * 人事状态,字典值
     */
    private String personStatus;

    /**
     * 个人照片
     */
    private String photo;

    /**
     * 婚姻状态（0：未婚，1：已婚，2：离异）
     */
    private String marryStatus;

    /**
     * 个人简历说明
     */
    private String resume;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;

    /**
     * 是否建立廉政档案（0：否，1：是）
     */
    private Integer integrityFlag;

    /**
     * 历史记录数
     */
    private Integer logNum;

    public enum ColName {
        user_info_id, user_id, employee_id, name, sex, birth, job_title, country, nation, native_place, household_place, political_status, id_card, id_card_front, id_card_back, phone, work_tel, family_tel, address, qq, wechat, email, party_date, wage_id, bank, bank_site, bank_card_id, person_status, photo, marry_status, resume, remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status, integrity_flag, log_num,
    }
}
